package com.yuyang.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yuyang.common.utils.PageUtils;
import com.yuyang.gulimall.product.entity.CategoryEntity;
import com.yuyang.gulimall.product.vo.Catelog2Vo;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author yuyang
 * @email yuyang@gmail.com
 * @date 2022-11-21 21:46:30
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<CategoryEntity> listWithTree();

    /**
     * 根据catelogId查出完整的路径
     * @param catelogId
     * @return
     */
    Long[] findCatelogPath(Long catelogId);
    //查出一级分类
    List<CategoryEntity> getCatelogLevelOne();

    Map<String, List<Catelog2Vo>> getCatelogLevelTwo();

    void updateCascade(CategoryEntity category);

}

